home *** CD-ROM | disk | FTP | other *** search
/ Into That Dark Night / Into That Dark Night.iso / pc / YadVashem / start.dxr / 00004.ls < prev    next >
Encoding:
Text File  |  2001-06-12  |  871 b   |  39 lines

  1. global gPathDel
  2.  
  3. on findpath
  4.   if the machineType = 256 then
  5.     openXLib("FileIO.DLL")
  6.     repeat with i = 67 to 90
  7.       set driveLetter to numToChar(i)
  8.       if getNthFileNameInFolder(driveLetter & ":\Achk", 1) = "ayad.txt" then
  9.         return driveLetter & ":\"
  10.       end if
  11.     end repeat
  12.     return EMPTY
  13.   else
  14.     set macCdName to "DarkNight"
  15.     set baseCD to macCdName & gPathDel
  16.     set testPath to baseCD & "achk:ayad.txt"
  17.     if checkIfFileExist(testPath) then
  18.       return baseCD
  19.     else
  20.       return EMPTY
  21.     end if
  22.   end if
  23. end
  24.  
  25. on checkIfFileExist fileName
  26.   set gMyFile to new(xtra("fileio"))
  27.   openFile(gMyFile, fileName, 1)
  28.   set theStat to status(gMyFile)
  29.   set theError to error(gMyFile, theStat)
  30.   if theStat <> 0 then
  31.     set theAnswer to 0
  32.   else
  33.     set theAnswer to 1
  34.     closeFile(gMyFile)
  35.   end if
  36.   set gMyFile to 0
  37.   return theAnswer
  38. end
  39.